package com.seewo.dubbo.debugger.admin.mapper;


import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.seewo.dubbo.debugger.admin.entity.Method;
import com.seewo.dubbo.debugger.admin.po.MethodInterfacePO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author chenliangliang
 * @since 2018-07-25
 */
public interface MethodMapper extends BaseMapper<Method> {

    /**
     * 批量插入
     *
     * @param list 数据
     * @return 插入成功的条数
     */
    int batchInsert(@Param("list") List<Method> list);

    /**
     * 连接查询method和interface表
     *
     * @param interfaceId
     * @param name
     * @return
     */
    MethodInterfacePO selectMethodInterface(@Param("interfaceId") Integer interfaceId, @Param("name") String name);

    /**
     * 通过methodId连接查询方法名和接口名
     *
     * @param methodId
     * @return
     */
    MethodInterfacePO selectMethodAndInterfaceNameByMethodId(@Param("methodId") Integer methodId);
}
